<?php

namespace Swof\Contracts\Routing;

interface Registrar
{
    /**
     * Register a new GET route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function get(string $uri, $action);

    /**
     * Register a new POST route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function post(string $uri, $action);

    /**
     * Register a new PUT route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function put(string $uri, $action);

    /**
     * Register a new DELETE route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function delete(string $uri, $action);

    /**
     * Register a new PATCH route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function patch(string $uri, $action);

    /**
     * Register a new OPTIONS route with the router.
     *
     * @param string $uri
     * @param $action
     */
    public function options(string $uri, $action);

    /**
     * Register a new route with the given verbs.
     *
     * @param array|string $methods
     * @param string $uri
     * @param $action
     */
    public function match($methods, string $uri, $action);
}

